<template>
  <el-tooltip placement="top" :disabled="disabled" :content="content">
    <span class="text_tooltip" ref="textTooltip">{{ content }}</span>
  </el-tooltip>
</template>

<script>
export default {
  props: {
    content: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      disabled: false,
    };
  },
  mounted() {
    this.$nextTick(() => {
      if (this.content.length > 10) {
        this.disabled = false;
      } else {
        this.disabled = true;
      }
    });
  },
};
</script>

<style lang="scss" scoped>
@import "~@/styles/mixin.scss";
.text_tooltip {
  @include textoverflow(1);
}
</style>